﻿using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CoreModule
{
    /// <summary>
    /// 
    /// </summary>
    /// 
    [Index("RefTime", AllDescending = true)]
    public class MeasurementArg
    {
        public MeasurementArg() { }

        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int VaporInterval { get; set; } = 1;

        /// <summary>
        /// 
        /// </summary>
        public double VaporLowValue { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public double VaporHighValue { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public DateTime RefTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 默认
        /// </summary>
        /// 
        [StringLength(200)]
        public string ClientId { get; set; } = Extension.GetClientId();
    }
}
